<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Like
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: Menus.php 2010-09-07 16:05 idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Like
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 */

class Like_Plugin_Menus {
	public function onMenuInitialize_UserEditInterests($row) {
		if (! Engine_Api::_ ()->getDbTable ( 'modules', 'core' )->isModuleEnabled ( 'like' )) {
			return false;
		}
		
		$viewer = Engine_Api::_ ()->user ()->getViewer ();
		$subject = Engine_Api::_ ()->core ()->getSubject ();
		
		if (! $subject->isSelf ( $viewer )) {
			return false;
		}
		
		return $row;
	}
}